import 'package:json_annotation/json_annotation.dart';

part 'message.g.dart';

@JsonSerializable()
class Message {
  final int id;
  final String message;
  final String msgType;
  final String msgTypeName;
  final bool viewed;
  final String senderName;
  final bool enableSm;
  final bool send;
  final String createTime;

  Message(
    this.id,
    this.message,
    this.msgType,
    this.msgTypeName,
    this.viewed,
    this.senderName,
    this.enableSm,
    this.send,
    this.createTime,
  );

  factory Message.fromJson(Map<String, dynamic> json) => _$MessageFromJson(json);

  Map<String, dynamic> toJson() => _$MessageToJson(this);
}
